package com.scientific.research.gobang.controller;

import com.scientific.research.gobang.pojo.User;
import com.scientific.research.gobang.service.SuperUserService;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.Map;

@RequestMapping("SuperUser")
@RestController//Rest是让所有方法的返回值都是JSON格式
public class SuperUserController {

    @Resource(name = "superUserServiceImpl")
    SuperUserService superUserService;

    //返回管理员界面的比赛信息，用户信息等
    @RequestMapping("superUserMessage")
    public Map superUserMessage(@RequestBody Map map) {
        return superUserService.superUserMessage(map);
    }

    //管理员登录认证
    @RequestMapping("superUserVerify")
    public Map superUserVerify(@RequestBody User user) {
        return superUserService.superUserVerify(user);
    }

}
